<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>育聘智联 - 企业招聘平台</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        }

        body {
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
            overflow-x: hidden;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 头部样式 - 苹果风格导航 */
        header {
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            position: sticky;
            top: 0;
            z-index: 1000;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            padding: 15px 0;
            box-shadow: 0 1px 10px rgba(0, 0, 0, 0.03);
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            display: flex;
            align-items: center;
            font-size: 26px;
            font-weight: 700;
            color: #000;
            text-decoration: none;
        }

        .logo i {
            margin-right: 12px;
            color: #0071e3;
        }

        .user-actions a {
            margin-left: 20px;
            text-decoration: none;
            color: #0071e3;
            font-weight: 500;
            padding: 10px 20px;
            border-radius: 12px;
            transition: all 0.3s;
        }

        .user-actions a:hover {
            background: rgba(0, 113, 227, 0.1);
        }

        .btn-primary {
            background: #0071e3;
            color: white !important;
            padding: 12px 24px !important;
        }

        .btn-primary:hover {
            background: #0062c4 !important;
        }

        /* 搜索区域样式 */
        .search-section {
            padding: 80px 0 50px;
            text-align: center;
            background: linear-gradient(to bottom, #f5f7fa, #e6ebf5);
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

        .search-section h1 {
            font-size: 48px;
            font-weight: 700;
            margin-bottom: 20px;
            color: #000;
            letter-spacing: -0.5px;
        }

        .search-section p {
            font-size: 22px;
            color: #666;
            margin-bottom: 40px;
            max-width: 700px;
            margin-left: auto;
            margin-right: auto;
        }

        /* 搜索表单样式 */
        .search-form {
            max-width: 800px;
            margin: 0 auto;
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
            padding: 20px;
            display: flex;
            align-items: center;
            transition: box-shadow 0.3s;
        }

        .search-form:hover {
            box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
        }

        .search-input {
            flex: 1;
            padding: 18px 20px;
            border: none;
            font-size: 18px;
            outline: none;
            border-radius: 12px;
            background: #f5f7fa;
        }

        .search-btn {
            background: #0071e3;
            color: white;
            border: none;
            padding: 18px 35px;
            border-radius: 12px;
            font-size: 18px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.3s;
            margin-left: 15px;
        }

        .search-btn:hover {
            background: #0062c4;
        }

        /* 筛选器样式 */
        .filters {
            display: flex;
            justify-content: center;
            margin: 30px 0 40px;
            flex-wrap: wrap;
            gap: 15px;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
            min-width: 200px;
        }

        .filter-group label {
            font-size: 14px;
            color: #666;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .filter-select {
            padding: 16px 20px;
            border: 1px solid #e0e0e0;
            border-radius: 12px;
            font-size: 16px;
            background: white;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            background-size: 1em;
            cursor: pointer;
        }

        .filter-select:focus {
            border-color: #0071e3;
            outline: none;
        }

        /* 职位列表样式 */
        .jobs-section {
            padding: 40px 0 80px;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }

        .section-title {
            font-size: 32px;
            font-weight: 700;
        }

        .view-all {
            color: #0071e3;
            text-decoration: none;
            font-weight: 500;
            font-size: 18px;
        }

        .jobs-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 25px;
        }

        .job-card {
            background: white;
            border-radius: 18px;
            padding: 30px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
            transition: all 0.3s ease;
            border: 1px solid rgba(0, 0, 0, 0.03);
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .job-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        }

        .job-type {
            display: inline-block;
            padding: 6px 12px;
            background: #f0f7ff;
            color: #0071e3;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 20px;
        }

        .job-title {
            font-size: 22px;
            font-weight: 700;
            margin-bottom: 15px;
            color: #000;
        }

        .job-company {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }

        .company-logo {
            width: 50px;
            height: 50px;
            background: #f5f7fa;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            font-size: 20px;
            color: #0071e3;
        }

        .company-info h3 {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 5px;
        }

        .company-info p {
            color: #666;
            font-size: 15px;
        }

        .candidate-info {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-top: 20px;
        }

        .info-item {
            display: flex;
            flex-direction: column;
        }

        .info-label {
            font-size: 13px;
            color: #888;
            margin-bottom: 5px;
        }

        .info-value {
            font-size: 16px;
            font-weight: 500;
        }

        .job-details {
            display: flex;
            justify-content: space-between;
            margin-top: 25px;
            padding-top: 20px;
            border-top: 1px solid #f0f0f0;
        }

        .salary {
            font-size: 20px;
            font-weight: 700;
            color: #000;
        }

        .job-location {
            display: flex;
            align-items: center;
            color: #666;
        }

        .job-location i {
            margin-right: 8px;
        }

        .detail-link {
            position: absolute;
            bottom: 30px;
            right: 30px;
            color: #0071e3;
            font-weight: 500;
            text-decoration: none;
            display: flex;
            align-items: center;
        }

        .detail-link i {
            margin-left: 5px;
            transition: transform 0.3s;
        }

        .job-card:hover .detail-link i {
            transform: translateX(3px);
        }

        /* 详情弹窗样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .modal.active {
            display: flex;
            opacity: 1;
        }

        .modal-content {
            background: white;
            border-radius: 24px;
            width: 90%;
            max-width: 800px;
            max-height: 90vh;
            overflow-y: auto;
            transform: scale(0.9);
            transition: transform 0.4s ease;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
        }

        .modal.active .modal-content {
            transform: scale(1);
        }

        .modal-header {
            padding: 30px 30px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #eee;
        }

        .modal-title {
            font-size: 28px;
            font-weight: 700;
        }

        .close-btn {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #999;
            transition: color 0.3s;
        }

        .close-btn:hover {
            color: #333;
        }

        .modal-body {
            padding: 30px;
        }

        .candidate-details {
            display: grid;
            grid-template-columns: 1fr 2fr;
            gap: 30px;
        }

        .candidate-photo {
            width: 100%;
            border-radius: 16px;
            overflow: hidden;
            background: #f5f7fa;
            height: 250px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 80px;
            color: #0071e3;
        }

        .candidate-info-detail {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin-top: 20px;
        }

        .info-box {
            background: #f9f9f9;
            border-radius: 12px;
            padding: 20px;
        }

        .info-box h4 {
            margin-bottom: 15px;
            color: #0071e3;
        }

        .info-list {
            list-style: none;
        }

        .info-list li {
            margin-bottom: 10px;
            display: flex;
        }

        .info-list li span:first-child {
            font-weight: 500;
            min-width: 100px;
            color: #666;
        }

        .modal-footer {
            padding: 20px 30px;
            display: flex;
            justify-content: flex-end;
            border-top: 1px solid #eee;
        }

        .btn {
            padding: 12px 24px;
            border-radius: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
            border: none;
            font-size: 16px;
        }

        .btn-outline {
            background: white;
            border: 1px solid #0071e3;
            color: #0071e3;
            margin-right: 15px;
        }

        .btn-outline:hover {
            background: #f0f7ff;
        }

        .btn-contact {
            background: #0071e3;
            color: white;
        }

        .btn-contact:hover {
            background: #0062c4;
        }

        /* 页脚样式 */
        footer {
            background: #fff;
            padding: 50px 0 30px;
            border-top: 1px solid #f0f0f0;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 30px;
        }

        .footer-column h3 {
            font-size: 18px;
            margin-bottom: 20px;
            color: #000;
            font-weight: 600;
        }

        .footer-column ul {
            list-style: none;
        }

        .footer-column ul li {
            margin-bottom: 15px;
        }

        .footer-column ul li a {
            text-decoration: none;
            color: #666;
            transition: color 0.3s;
        }

        .footer-column ul li a:hover {
            color: #0071e3;
        }

        .copyright {
            text-align: center;
            padding-top: 40px;
            color: #999;
            font-size: 14px;
        }

        /* 响应式设计 */
        @media (max-width: 900px) {
            .footer-content {
                grid-template-columns: repeat(2, 1fr);
            }

            .jobs-grid {
                grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            }

            .search-form {
                flex-direction: column;
            }

            .search-input {
                width: 100%;
                margin-bottom: 15px;
            }

            .search-btn {
                width: 100%;
                margin-left: 0;
            }

            .candidate-details {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 600px) {
            .filters {
                flex-direction: column;
            }

            .section-header {
                flex-direction: column;
                align-items: flex-start;
            }

            .view-all {
                margin-top: 15px;
            }

            .footer-content {
                grid-template-columns: 1fr;
            }

            .candidate-info {
                grid-template-columns: 1fr;
            }

            .candidate-info-detail {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
    <!-- 头部导航 -->
    <header>
        <div class="container">
            <div class="header-content">
                <a href="#" class="logo">
                    <i class="fas fa-graduation-cap"></i>
                    育聘智联
                </a>
                <div class="user-actions">
                    <a href="#"><i class="fas fa-user"></i> 企业登录</a>
                    <a href="#" class="btn-primary"><i class="fas fa-plus"></i> 发布职位</a>
                </div>
            </div>
        </div>
    </header>

     <!-- 搜索区域 -->
    <section class="search-section">
        <div class="container">
            <h1>连接企业与顶尖人才</h1>
            <p>高效招聘解决方案，为企业提供精准匹配的专业人才</p>

            <form class="search-form">
                <input type="text" class="search-input" name = 'query' placeholder="职位名称，技能关键词等">
                <button type="submit" class="search-btn"><i class="fas fa-search"></i> 搜索人才</button>
            </form>


            <div class="filters">
                <div class="filter-group">
                    <label>职位类别</label>
                    <select class="filter-select">
                        <option>所有类别</option>
                        <option>技术开发</option>
                        <option>产品设计</option>
                        <option>市场营销</option>
                        <option>人力资源</option>
                        <option>金融财务</option>
                    </select>
                </div>

                <div class="filter-group">
                    <label>薪资范围</label>
                    <select class="filter-select">
                        <option>不限薪资</option>
                        <option>5k-10k</option>
                        <option>10k-15k</option>
                        <option>15k-20k</option>
                        <option>20k以上</option>
                    </select>
                </div>

                <div class="filter-group">
                    <label>工作经验</label>
                    <select class="filter-select">
                        <option>不限经验</option>
                        <option>应届毕业生</option>
                        <option>1-3年</option>
                        <option>3-5年</option>
                        <option>5年以上</option>
                    </select>
                </div>

                <div class="filter-group">
                    <label>工作地点</label>
                    <select class="filter-select">
                        <option>全国</option>
                        <option>北京</option>
                        <option>上海</option>
                        <option>深圳</option>
                        <option>广州</option>
                        <option>杭州</option>
                    </select>
                </div>
            </div>
        </div>
    </section>





    <!-- 职位列表 -->
    <section class="jobs-section">
        <div class="container">
            <div class="section-header">
                <h2 class="section-title">推荐人才</h2>
                <a href="#" class="view-all">查看全部 <i class="fas fa-arrow-right"></i></a>
            </div>

            <div class="jobs-grid">
                <!-- 推荐人才卡片区，全部内容由JS动态渲染 -->
                <div id="recommended-cards"></div>
            </div>
        </div>
    </section>

    <!-- 详情弹窗 -->
    <div class="modal" id="jobModal">
        <div class="modal-content">
            <div class="modal-header">
                <h3 class="modal-title">人才详情</h3>
                <button class="close-btn" onclick="closeModal()">&times;</button>
            </div>
            <div class="modal-body">
                <div class="candidate-details">
                    <div class="candidate-photo">
                        <i class="fas fa-user"></i>
                    </div>
                    <div>
                        <h3 id="detail-name"></h3>
                        <p id="detail-title"></p>

                        <div class="candidate-info-detail">
                            <div class="info-box">
                                <h4>基本信息</h4>
                                <ul class="info-list">
                                    <li><span>年龄：</span> <span id="detail-age"></span></li>
                                    <li><span>学历：</span> <span id="detail-education"></span></li>
                                    <li><span>工作经验：</span> <span id="detail-exp"></span></li>
                                    <li><span>所在地：</span> <span id="detail-location"></span></li>
                                </ul>
                            </div>

                            <div class="info-box">
                                <h4>薪资期望</h4>
                                <ul class="info-list">
                                    <li><span>期望薪资：</span> <span id="detail-salary"></span></li>
                                    <li><span>工作类型：</span> <span id="detail-type"></span></li>
                                    <li><span>到岗时间：</span> <span id="detail-time"></span></li>
                                </ul>
                            </div>

                            <div class="info-box">
                                <h4>专业技能</h4>
                                <ul class="info-list">
                                    <li><span>前端框架：</span> <span></span></li>
                                    <li><span>编程语言：</span> <span></span></li>
                                    <li><span>其他技能：</span> <span></span></li>
                                </ul>
                            </div>

                            <div class="info-box">
                                <h4>工作经历</h4>
                                <ul class="info-list">
                                    <li><span>2019-至今：</span> <span></span></li>
                                    <li><span>2017-2019：</span> <span></span></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-outline">收藏人才</button>
                <button class="btn btn-contact">立即沟通</button>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer>
        <div class="container">
            <div class="footer-content">
                <div class="footer-column">
                    <h3>育聘智联</h3>
                    <ul>
                        <li><a href="#">关于我们</a></li>
                        <li><a href="#">加入我们</a></li>
                        <li><a href="#">新闻中心</a></li>
                        <li><a href="#">社会责任</a></li>
                    </ul>
                </div>

                <div class="footer-column">
                    <h3>企业服务</h3>
                    <ul>
                        <li><a href="#">发布职位</a></li>
                        <li><a href="#">人才搜索</a></li>
                        <li><a href="#">招聘解决方案</a></li>
                        <li><a href="#">企业账户</a></li>
                    </ul>
                </div>

                <div class="footer-column">
                    <h3>帮助中心</h3>
                    <ul>
                        <li><a href="#">使用指南</a></li>
                        <li><a href="#">常见问题</a></li>
                        <li><a href="#">服务条款</a></li>
                        <li><a href="#">隐私政策</a></li>
                    </ul>
                </div>

                <div class="footer-column">
                    <h3>联系我们</h3>
                    <ul>
                        <li><a href="#">客服热线: 400-888-8888</a></li>
                        <li><a href="#">企业合作: partner@yupin.com</a></li>
                        <li><a href="#">媒体联系: press@yupin.com</a></li>
                        <li>
                            <div style="margin-top: 15px;">
                                <a href="#" style="font-size: 24px; margin-right: 15px;"><i class="fab fa-weixin"></i></a>
                                <a href="#" style="font-size: 24px; margin-right: 15px;"><i class="fab fa-weibo"></i></a>
                                <a href="#" style="font-size: 24px;"><i class="fab fa-linkedin"></i></a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>

            <div class="copyright">
                <p>© 2023 育聘智联 Inc. 保留所有权利。沪ICP备12345678号</p>
            </div>
        </div>
    </footer>

    <script>



        // 推荐人才卡片动态渲染
        function openModal(candidate) {
            const modal = document.getElementById('jobModal');
            modal.classList.add('active');
            document.getElementById('detail-name').textContent = candidate.filename;
            document.getElementById('detail-title').textContent = candidate.content;
            document.getElementById('detail-age').textContent = '';
            document.getElementById('detail-education').textContent = candidate.education;
            document.getElementById('detail-exp').textContent = candidate.experience;
            document.getElementById('detail-location').textContent = candidate.upload_time;
            document.getElementById('detail-salary').textContent = '';
            document.getElementById('detail-type').textContent = '';
            document.getElementById('detail-time').textContent = '';
        }

        function closeModal() {
            const modal = document.getElementById('jobModal');
            modal.classList.remove('active');
        }

        window.onclick = function(event) {
            const modal = document.getElementById('jobModal');
            if (event.target == modal) {
                closeModal();
            }
        }

        // 页面加载时请求推荐人才
        document.addEventListener('DOMContentLoaded', function() {
            fetch('/api/recommended')
                .then(res => res.json())
                .then(data => {
                    if (!data.success) return;
                    const cardsDiv = document.getElementById('recommended-cards');
                    cardsDiv.innerHTML = '';
                    data.candidates.forEach(candidate => {
                        const card = document.createElement('div');
                        card.className = 'job-card';
                        card.onclick = () => openModal(candidate);
                        card.innerHTML = `
                            <span class="job-type">简历</span>
                            <h3 class="job-title">${candidate.filename}</h3>
                            <div class="candidate-info">
                                <div class="info-item">
                                    <span class="info-label">学历</span>
                                    <span class="info-value">${candidate.education || '未知'}</span>
                                </div>
                                <div class="info-item">
                                    <span class="info-label">工作经验</span>
                                    <span class="info-value">${candidate.experience || '未知'}</span>
                                </div>
                                <div class="info-item">
                                    <span class="info-label">上传时间</span>
                                    <span class="info-value">${candidate.upload_time}</span>
                                </div>
                            </div>
                            <div class="job-details">
                                <div class="salary">预览: ${candidate.content}</div>
                            </div>
                        `;
                        cardsDiv.appendChild(card);
                    });
                });
        });

        // 关闭详情弹窗
        function closeModal() {
            const modal = document.getElementById('jobModal');
            modal.classList.remove('active');
        }

        // 点击弹窗外部关闭
        window.onclick = function(event) {
            const modal = document.getElementById('jobModal');
            if (event.target == modal) {
                closeModal();
            }
        }
    </script>
</body>
</html>